let arr = ['hello', 12, true, null, undefined];
// 数组的实例方法 keys values entires 
let keys = arr.keys();
let values = arr.values();
let entries = arr.entries();
console.log(keys, values, entries);
// 只要实现迭代器的接口 就可以使用for of 遍历
for (let key of keys) {
    // 返回数组索引
    console.log(key);
}
for (let value of values) {
    console.log(value);
}
for (let entry of entries) {
    console.log(entry);
}
// let [a,b]=10;//报错 10不是可迭代对象
// let [a, b, c, d, e] = 'string';
// console.log(a, b, c, d, e);
// let str = 'world';
// let result = str.split();
// console.log(result);
// let [...a] = str;
// console.log(a);
// for (let key of str) {
//     console.log(key);
// }

